home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form NewFolder
- Caption = "New Folder"
- ClientHeight = 2040
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 3705
- Icon = "NewFolder.frx":0000
- LinkTopic = "Form2"
- ScaleHeight = 2040
- ScaleWidth = 3705
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Cancel
- Caption = "Cancel"
- Height = 375
- Left = 2400
- TabIndex = 3
- Top = 1560
- Width = 1095
- End
- Begin VB.CommandButton OK
- Caption = "OK"
- Height = 375
- Left = 2400
- TabIndex = 2
- Top = 1080
- Width = 1095
- End
- Begin VB.TextBox NewName
- Height = 375
- Left = 120
- TabIndex = 1
- Top = 480
- Width = 3375
- End
- Begin VB.Label Label1
- Caption = "&New Folder Name:"
- Height = 255
- Left = 120
- TabIndex = 0
- Top = 240
- Width = 1455
- End
- Attribute VB_Name = "NewFolder"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Cancel_Click()
- ' we're done, so unload the form
- Unload Me
- End Sub
- Private Sub OK_Click()
- ' make sure we have an item selected first
- If Not Form1.FtpTree1.SelItem Is Nothing Then
- ' try to create the folder
- Ret = Form1.FtpTree1.SelItem.CreateDirWithName(NewName)
- ' if unable to create the folder, display an error message
- If Not Ret Then
- MsgBox "Error Creating: " + NewName, vbExclamation, "FtpTree ActiveX Control VB Sample"
- Else
- Unload Me
- End If
- Else
- MsgBox "Please select a parent folder before using this option.", , "FtpTree ActiveX Control VB Sample"
- End If
- End Sub
-